
package org.hibernate.validator.xml;

import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(
        name = "beanType",
        propOrder = {"classType", "field", "getter"}
)
public class BeanType {
    @XmlElement(
            name = "class"
    )
    protected ClassType classType;
    protected List<FieldType> field;
    protected List<GetterType> getter;
    @XmlAttribute(
            name = "class",
            required = true
    )
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    protected String clazz;
    @XmlAttribute(
            name = "ignore-annotations"
    )
    protected Boolean ignoreAnnotations;

    public BeanType() {
    }

    public ClassType getClassType() {
        return this.classType;
    }

    public void setClassType(ClassType value) {
        this.classType = value;
    }

    public List<FieldType> getField() {
        if (this.field == null) {
            this.field = new ArrayList();
        }

        return this.field;
    }

    public List<GetterType> getGetter() {
        if (this.getter == null) {
            this.getter = new ArrayList();
        }

        return this.getter;
    }

    public String getClazz() {
        return this.clazz;
    }

    public void setClazz(String value) {
        this.clazz = value;
    }

    public Boolean isIgnoreAnnotations() {
        return this.ignoreAnnotations;
    }

    public void setIgnoreAnnotations(Boolean value) {
        this.ignoreAnnotations = value;
    }
}
